using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace SsLib
{
    public class SimProg : BasicIO
    {
        /// <summary>
        /// Constructor for the SimProg object intance.
        /// </summary>
        /// <remarks>
        /// Sets the _sysin and _sysout local fields of this SimObject, which emulates the encosing inspets of SYSIN and SYSOUT of the program.
        /// Also creates a WaitHandle for this SimObject (which constitutes the Main Component of the quasi-parallel system).
        /// Tthe thread-local SimObject.CurrentCoroutine static field is set to the SimProg object.
        /// </remarks>
        public SimProg()
        {
            this._waitHandle = new AutoResetEvent(false);
            SimObject.CurrentCoroutine = this;
          
            this._sysin = this.SysIn();
            this._sysout = this.SysOut();
        }
    }
}
